#include <iostream>
using namespace std;

int main() {
	string s("ab2c3d7R4E6");
	string::size_type pos = 0;
	
	while((pos = s.find_first_of("1234567890", pos)) != string::npos){
		cout << "found numeric in index "
			<< pos << " is "
			<< s[pos] << endl;
		++pos;
	}
	
	pos = 0;
	while((pos = s.find_first_not_of("1234567890", pos)) != string::npos){
		cout <<"found non-numeric in inedex "
			<< pos << " is "
			<< s[pos] << endl;
		++pos;
	}
	
	pos = 0;
	while((pos = s.find_first_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", pos)) != string::npos){
		cout << "found alphabet in index "
			<< pos << " is " 
			<< s[pos] << endl;
		++pos;
	}
}
